package siestageek;
import java.util.Scanner;
public class J03Tax {
		  //세금계산프로그램
    	 //조건1:미혼-연봉이 3000미만:5%
	    //                 연봉이 3000이상:10%

        //조건2:기혼-연봉이 5000미만:15%
      //                   연봉이5000이상:30%
     //입력값:결혼여부, 연봉
    //결과값:세금율에 따른 세금	
	  public static void main(String args[]){
		  //1.변수선언
		  int married;  //결혼여부, 0:미혼, 1:기혼
		  int salary;    //연봉
		  double tax = 0;  //초기화 필수
		  String title1="결혼여부를 입력하세요(0:미혼, 1:기혼)";
		  String title2="연봉을 입력하세요";
		  Scanner sc = null;
		 //2.결혼여부, 연봉입력 및 세금계산
		  sc = new Scanner(System.in);
		  System.out.println(title1);  //결혼여부
		  married = sc.nextInt();
		  System.out.println(title2);  //연봉
		  salary = sc.nextInt();
		  if(married==0){
			  if(salary<3000){tax = salary * 0.05;}
			  else if(salary>=3000){tax = salary * 0.1;}
		  }
		  if(married==1){
			  if(salary<5000){tax = salary * 0.15;}
			  else if(salary>=5000){tax = salary * 0.3;}
		  }
		  sc.close();
		//3.결과출력
		System.out.println(married);
		System.out.println(salary);
		System.out.println(tax);
     }
}
